
#ifndef __DOCUMENT_MANAGER_H__
#define __DOCUMENT_MANAGER_H__

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include "document.h"

G_BEGIN_DECLS


#define TYPE_DOCUMENT_MANAGER (document_manager_get_type ())
#define DOCUMENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DOCUMENT_MANAGER, DocumentManager))
#define DOCUMENT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DOCUMENT_MANAGER, DocumentManagerClass))
#define IS_DOCUMENT_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DOCUMENT_MANAGER))
#define IS_DOCUMENT_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DOCUMENT_MANAGER))
#define DOCUMENT_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DOCUMENT_MANAGER, DocumentManagerClass))

typedef struct _DocumentManager DocumentManager;
typedef struct _DocumentManagerClass DocumentManagerClass;
typedef struct _DocumentManagerPrivate DocumentManagerPrivate;

struct _DocumentManager {
	GtkNotebook parent_instance;
	DocumentManagerPrivate * priv;
};

struct _DocumentManagerClass {
	GtkNotebookClass parent_class;
};


gboolean document_manager_create (DocumentManager* self, const char* filename);
void document_manager_open (DocumentManager* self);
void document_manager_save_current (DocumentManager* self);
void document_manager_save_as_current (DocumentManager* self);
void document_manager_save_all (DocumentManager* self);
void document_manager_close_current (DocumentManager* self);
gboolean document_manager_close_all (DocumentManager* self);
void document_manager_undo_current (DocumentManager* self);
void document_manager_redo_current (DocumentManager* self);
void document_manager_cut_current (DocumentManager* self);
void document_manager_copy_current (DocumentManager* self);
void document_manager_paste_current (DocumentManager* self);
void document_manager_delete_current (DocumentManager* self);
void document_manager_select_all_current (DocumentManager* self);
void document_manager_search_in_current (DocumentManager* self);
void document_manager_replace_in_current (DocumentManager* self);
void document_manager_goto_line_current (DocumentManager* self);
void document_manager_goto_next_found_match_current (DocumentManager* self);
void document_manager_goto_prev_found_match_current (DocumentManager* self);
DocumentManager* document_manager_get_instance (void);
void document_manager_on_page_added (DocumentManager* self, DocumentManager* document_manager, GtkWidget* p0, guint p1);
void document_manager_on_page_removed (DocumentManager* self, DocumentManager* document_manager, GtkWidget* p0, guint p1);
Document* document_manager_get_current_doc (DocumentManager* self);
GType document_manager_get_type (void);


G_END_DECLS

#endif
